{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
	<li class="active"><a href="#tab_share">分享设置</a></li>
</ul>
<div class="app-content">
<div class="app-form">
	<form action="" method="post" class="form-horizontal form form-validate">
		<div class="panel-heading">系统设置</div>
		<div class="tab-content">
			<div class="form-group">
				<label class="col-sm-2 control-label">分享标题<span class="must-fill">*</span></label>
				<div class="col-sm-9">
					<input type="text" name="share[share_title]" class="form-control" value="{$settings['share_title']}" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">分享图片</label>
				<div class="col-sm-9">
					{php echo attachment_select('share[share_image]', $settings['share_image'])}
					<div class="help-block">系统默认分享图片，建议500*500</div>
				</div>
			</div>
			{if p('wxapp')}
			<div class="form-group">
				<label class="col-sm-2 control-label">小程序分享图片</label>
				<div class="col-sm-9">
					{php echo attachment_select('share[wxapp_share_image]', $settings['wxapp_share_image'])}
					<div class="help-block">小程序分享图片，建议500*400</div>
				</div>
			</div>
			{/if}
			<div class="form-group">
				<label class="col-sm-2 control-label">分享描述</label>
				<div class="col-sm-9">
				<input type="text" name="share[share_desc]" class="form-control" value="{$settings['share_desc']}" >
				</div>
			</div>
			{if p('wxplatform')}
			<div class="form-group">
				<label class="col-sm-2 control-label">引导关注</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" id="inlineRadio1" name="share[gz_status]" value="0" {if intval($settings['gz_status']) == 0 || empty($settings['gz_status'])}checked="checked"{/if}>关闭
					</label>
					<label class="radio radio-success radio-inline">
						<input type="radio" id="inlineRadio2" name="share[gz_status]" value="1" {if intval($settings['gz_status']) == 1}checked="checked"{/if}>开启
					</label>
					<span class="help-block">仅公众号端可用</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">关注二维码</label>
				<div class="col-sm-9">
					{php echo attachment_select('share[gz_image]', $settings['gz_image'])}
					<span class="help-block">有二维码时，优先弹出关注二维码</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">强制关注</label>
				<div class="col-sm-9">
					{if p('rush')}
					<label class="checkbox-inline">
						<input type="checkbox" value="rush" {if in_array('rush',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 抢购活动
					</label>
					{/if}
					{if p('wlcoupon')}
					<label class="checkbox-inline">
						<input type="checkbox" value="wlcoupon" {if in_array('wlcoupon',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 超级券
					</label>
					{/if}
					{if p('wlfightgroup')}
					<label class="checkbox-inline">
						<input type="checkbox" value="wlfightgroup" {if in_array('wlfightgroup',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 拼团商城
					</label>
					{/if}
					{if p('activity')}
					<label class="checkbox-inline">
						<input type="checkbox" value="activity" {if in_array('activity',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 同城活动
					</label>
					{/if}
					{if p('groupon')}
					<label class="checkbox-inline">
						<input type="checkbox" value="groupon" {if in_array('groupon',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 团购活动
					</label>
					{/if}
					{if p('bargain') }
					<label class="checkbox-inline">
						<input type="checkbox" value="bargain" {if in_array('bargain',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 报名砍价
					</label>
                    <label class="checkbox-inline">
                        <input type="checkbox" value="helpBargain" {if in_array('helpBargain',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 帮忙砍价
                    </label>
					{/if}
                    <label class="checkbox-inline">
                        <input type="checkbox" value="payOnline" {if in_array('payOnline',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 在线买单
                    </label>
					{if uniacid_p('consumption')}
					<label class="checkbox-inline">
						<input type="checkbox" value="integral" {if in_array('integral',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 积分兑换
					</label>
					{/if}
                    {if p('distribution')}
                    <label class="checkbox-inline">
                        <input type="checkbox" value="distribution" {if in_array('distribution',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 申请分销商
                    </label>
                    {/if}
					{if p('pocket')}
					<label class="checkbox-inline">
						<input type="checkbox" value="pocket" {if in_array('pocket',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 掌上信息
					</label>
					{/if}
					{if p('draw')}
					<label class="checkbox-inline">
						<input type="checkbox" value="draw" {if in_array('draw',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 幸运抽奖
					</label>
					{/if}
					{if uniacid_p('mobilerecharge')}
					<label class="checkbox-inline">
						<input type="checkbox" value="mobilerecharge" {if in_array('mobilerecharge',$settings['forcefollow'])} checked="checked" {/if} name="forcefollow[]" /> 话费充值
					</label>
					{/if}
					<span class="help-block">用户购买下单时，可以强制用户关注公众号以后购买商品，仅公众号端可用</span>
				</div>
			</div>
			{/if}
			{if Customized::init('transfergift') > 0}
				{if p('wxplatform')}
				<div class="form-group">
					<label class="col-sm-2 control-label">转赠分享图片</label>
					<div class="col-sm-9">
						{php echo attachment_select('share[tr_share_image]', $settings['tr_share_image'])}
						<div class="help-block">系统默认分享图片，建议500*500</div>
					</div>
				</div>
				{/if}
				{if p('wxapp')}
				<div class="form-group">
					<label class="col-sm-2 control-label">转赠小程序分享图片</label>
					<div class="col-sm-9">
						{php echo attachment_select('share[tr_wxapp_share_image]', $settings['tr_wxapp_share_image'])}
						<div class="help-block">小程序分享图片，建议500*400</div>
					</div>
				</div>
				{/if}
			{/if}
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"></label>
			<div class="col-sm-9">
				<input type="submit" name="submit" value="提交" class="btn btn-primary min-width" />
				<input type="hidden" name="token" value="{$_W['token']}" />
			</div>
		</div>
	</form>
</div>
</div>
<script>
	$(function () {
		window.optionchanged = false;
		$('#myTab a').click(function (e) {
			e.preventDefault();//阻止a链接的跳转行为
			$(this).tab('show');//显示当前选中的链接及关联的content
		})
	});
</script>
{php include wl_template('common/footer');}